//数据字典获取
var sy_dict = function (value, row, index) {
    var url = "/sys/codeItems/byCategoryCodeAndCode";
    var dictionary = this.dictionary;
    var name = value;
    //if(value=="") return "";
    $.ajax({
        type: "post",
        url: url,
        data: {
            categoryCode: dictionary,
            code: value
        },
        dataType: "json",
        async: false,//同步请求
        success: function (data) {
            if(data.success) {
                name =  data.obj;
            }
        }
    });
    return name;
};

//组织机构
var sy_other_org = function(value, row, index) {
    var url = "/sys/organization/getOrgNameById";
    return sy_other(value,row,index,url);
}


//根据ID 获取名称
var sy_other = function (value, row, index,url) {
    if(!url) {
        url = this.url;
    }
    if(!value) {
        return "";
    }
    var name = value;
    //if(value=="") return "";
    $.ajax({
        type: "post",
        url: url,
        data: {
            id: value
        },
        dataType: "json",
        async: false,//同步请求
        success: function (data) {
            if(data.success) {
                name =  data.obj;
            }
        }
    });
    return name;
};




